Skip to content

fix(step): preserve step.name in simplify() for worker IPC#5563

Closed
gololdf1sh wants to merge 1 commit into
codeceptjs:4.xfrom
gololdf1sh:fix/simplify-preserve-step-name
Closed

fix(step): preserve step.name in simplify() for worker IPC#5563
gololdf1sh wants to merge 1 commit into
codeceptjs:4.xfrom
gololdf1sh:fix/simplify-preserve-step-name

Conversation

@gololdf1sh
Copy link
Copy Markdown

Problem

step.simplify() maps nametitle, dropping name from the serialized object sent via IPC from workers to the master process. Any plugin listening to step events in the master process (e.g. retryFailedStep) crashes because step.name is undefined:

TypeError: Cannot read properties of undefined (reading 'startsWith')
    at retryFailedStep.js:118:52

Root cause

simplify() in lib/step/base.js returns { title: step.name, ... } — the field is renamed from name to title. In sequential mode, plugins receive the full Step object with .name. In run-workers mode, the worker serializes via simplify() before IPC, so the master receives an object with .title only.

Fix

  1. lib/step/base.js — add name: step.name to simplify() output (alongside title for backwards compatibility)
  2. lib/plugin/retryFailedStep.js — add null-guard for edge cases where step.name is undefined on the full Step object (hook steps)

Related

🤖 Generated with Claude Code

step.simplify() maps name → title, dropping name from the serialized
object. Plugins listening to step events in the master process (e.g.
retryFailedStep) crash on step.name being undefined.

Add name to simplify() output alongside title (kept for BC).
Add null-guard in retryFailedStep for edge cases where step.name is
undefined on the full Step object (hook steps).

Closes testomatio/e2e-tests#139

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@gololdf1sh
Copy link
Copy Markdown
Author

Closing — wrong approach, replaced by a proper refactor PR.

@gololdf1sh gololdf1sh closed this May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant